﻿namespace demo06引用类型
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello, World!");
            //string字符串 
            //不可变的字符数组
            //必须写在 ""
            string s = "hallo-你好-呀";
            Console.WriteLine(s);

            String s2 = "hallo-你好-呀";
            Console.WriteLine(s2);

            string s3 = new string("aaa");
            Console.WriteLine(s3);



            //格式化输出
            string ss = "阿豪";
            string ss1 = $"我的名字叫{ss}";
            Console.WriteLine(ss1);

            int age = 10;
            string ages = $"我的年龄是{age}";
            Console.WriteLine(ages);

            int age2 = 20;
            Console.WriteLine("我的年龄是{0},{1}",age,age2);



            //object类型  不要使用  非常消耗性能
            object o = 10;
            Console.WriteLine(o);
            o = "aaa";
            Console.WriteLine(o);
            o = false;
            Console.WriteLine(o);
            double dw = 1.1;
            o = dw;
            Console.WriteLine(o);


        }
    }
}
